
package com.zhongketech.sunflower.utils;

import java.util.HashMap;

public class GetBitmap {

    private HashMap<Integer, String> reflectImgMap = new HashMap<Integer, String>();

    private static GetBitmap getBitmapInstance = null;

    public static GetBitmap getInstance() {
        if (getBitmapInstance == null) {
            getBitmapInstance = new GetBitmap();
        }
        return getBitmapInstance;
    }

    public GetBitmap() {

    }

    public void putBitmapData(int viewId, String imgPath) {
        reflectImgMap.put(viewId, imgPath);
    }

    public String getBitmapData(int viewId) {
        String imgPath = null;
        if (reflectImgMap.containsKey(viewId)) {
            imgPath = reflectImgMap.get(viewId);
        }
        if (imgPath != null) {
            return imgPath;
        }
        return null;
    }

}
